﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PerformanceAgreement.aspx.cs" Inherits="KPIS.GERP.GHRMS.APP.App_UI.Forms.PerformanceAgreement" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">
        </telerik:RadCodeBlock>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            
        </telerik:RadScriptManager>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="pnlAgreeShow">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="pnlAgreeShow" LoadingPanelID="RadAjaxLoadingPanel2" />
                        <telerik:AjaxUpdatedControl ControlID="pnlAgreeAdd" LoadingPanelID="RadAjaxLoadingPanel2" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="pnlAgreeAdd">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="pnlAgreeAdd" LoadingPanelID="RadAjaxLoadingPanel2" />
                        <telerik:AjaxUpdatedControl ControlID="pnlAgreeShow" LoadingPanelID="RadAjaxLoadingPanel2" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
             </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="100%" Width="75px" Transparency="50">
        <table style="height: 100%; width: 100%" border="0">
            <tr>
                <td width="100%" align="center" valign="middle">
                    <img alt="Loading..." 
                        src="../Images/Buttons/loading.gif" 
                        style="border: 0px;" />
                </td>
            </tr>
        </table>
    </telerik:RadAjaxLoadingPanel>
        <!-- content start -->
         <div class="moduleDivSlim1000x450">
         <div class="moduleDivBottom1000">
             <table>
                 <tr>
                     <td class ="tableHeader">ประวัติxxx</td>
                 </tr>
                 <tr>
                     <td>
                         <asp:LinkButton Font-Underline="False" Font-Weight="Bold" ID="ShowGrid" 
                             runat="server" onclick="ShowGrid_Click">
                                     <img style="border:0px;vertical-align:middle;" alt="" src="../Images/Buttons/Refresh.gif" />&nbsp;&nbsp;แสดงข้อมูลทั้งหมด
                         </asp:LinkButton>
                         <asp:LinkButton Font-Underline="False" Font-Weight="Bold" ID="AddNew" 
                             runat="server" onclick="AddNew_Click" >
                                      <img style="border:0px;vertical-align:middle;" alt="" src="../Images/Buttons/AddRecord.gif" />&nbsp;&nbsp;เพิ่มข้อมูลใหม่
                         </asp:LinkButton>
                         <asp:LinkButton Font-Underline="False" Font-Weight="Bold" ID="Save_AddNew" 
                                                runat="server" onclick="Save_AddNew_Click" OnClientClick="javascript:return confirm('ต้องการบันทึกข้อมูลใช่หรือไม่')">
                                       <img style="border:0px;vertical-align:middle;" alt="" src="../Images/Buttons/saveDisk.gif" />&nbsp;&nbsp;บันทึกข้อมูล
                        </asp:LinkButton>  
                        <asp:LinkButton Font-Underline="False" Font-Weight="Bold" ID="Save_Edit" 
                                                runat="server" onclick="Save_Edit_Click" OnClientClick="javascript:return confirm('ต้องการบันทึกข้อมูลใช่หรือไม่')">
                                                <img style="border:0px;vertical-align:middle;" alt="" src="../Images/Buttons/saveDisk.gif" />&nbsp;&nbsp;บันทึกข้อมูล
                        </asp:LinkButton>
                        <asp:LinkButton ID="Delete" runat="server" CssClass="ControlLinkButton"
                             OnClientClick="javascript:return confirm('ต้องการลบข้อมูลใช่หรือไม่')" 
                             onclick="Delete_Click">
                                       <img style="border:0px;vertical-align:middle;" alt="" src="../Images/Buttons/Delete.gif" CommandName="GridDelete" />&nbsp;&nbsp;ลบข้อมูล
                       </asp:LinkButton>
                     </td>
                 </tr>
             </table>
             <table width = "1000px">
                <tr>  
                    <td>
                        <asp:Panel ID="pnlAgreeShow" runat="server" Height="400px" Width = "980" ScrollBars ="Auto">
                            <telerik:RadGrid ID="dgtPerAgreement" runat="server" AllowAutomaticDeletes="True" 
                            AllowFilteringByColumn="True" AllowMultiRowEdit="True" 
                            AllowMultiRowSelection="True" AllowPaging="True" AllowSorting="True" 
                            AutoGenerateColumns="False" GridLines="None" 
                            GroupingSettings-GroupByFieldsSeparator="&nbsp;&nbsp;&nbsp;&nbsp;" 
                            OnItemCommand="dgtPerAgreement_ItemCommand" 
                            OnNeedDataSource="dgtPerAgreement_NeedDataSource" Skin="Office2007" 
                            Width="80%">
                          <MasterTableView AllowMultiColumnSorting="True" CellSpacing="-1" 
                                ClientDataKeyNames="perf_agreement_seq" CommandItemDisplay="Top" DataKeyNames="perf_agreement_seq" 
                                NoMasterRecordsText="&lt; ไม่มีข้อมูล &gt;">
                                <CommandItemTemplate>
                                </CommandItemTemplate>
                                <RowIndicatorColumn>
                                    <HeaderStyle Width="15px" />
                                </RowIndicatorColumn>
                                <ExpandCollapseColumn>
                                    <HeaderStyle Width="15px" />
                                </ExpandCollapseColumn>                                
                                <Columns>
                                <telerik:GridClientSelectColumn UniqueName="checkCol" >
                                        <HeaderStyle Width="15px"/>
                                </telerik:GridClientSelectColumn>
                                <telerik:GridButtonColumn HeaderText="แก้ไข" ImageUrl="../Images/Buttons/Edit.gif" ButtonType="ImageButton" CommandName="GridEdit">
                                        <HeaderStyle Width="15px" />
                                </telerik:GridButtonColumn>
                                 <telerik:GridBoundColumn HeaderText="PK"  UniqueName="perf_agreement_seq" DataField="perf_agreement_seq" Visible="false"></telerik:GridBoundColumn>
                                 <telerik:GridBoundColumn HeaderText="Gobal/Object" DataField="goal_objective" UniqueName="goal_objective" 
                                        ShowFilterIcon="false" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" FilterControlWidth="100%">
                                        <HeaderStyle Width="200px" />
                                   </telerik:GridBoundColumn>
                                   <telerik:GridBoundColumn HeaderText="Action/Plane" DataField="action_plan" UniqueName="action_plan"
                                        ShowFilterIcon="false" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" FilterControlWidth="100%">
                                        <HeaderStyle Width="200px" />
                                   </telerik:GridBoundColumn>
                                   <telerik:GridBoundColumn HeaderText="หมายเหตุ" DataField="remark" UniqueName="remark"
                                        ShowFilterIcon="false" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" FilterControlWidth="100%">
                                        <HeaderStyle Width="190px" />
                                   </telerik:GridBoundColumn>
                           </Columns>      
                        <EditFormSettings EditFormType="WebUserControl" 
                                    UserControlName="../UserControls/PS_HisNames.ascx">
                                    <EditColumn UniqueName="EditCommandColumn1"></EditColumn>
                        </EditFormSettings>
                       <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                  </MasterTableView>
                  <ClientSettings AllowColumnHide="True" AllowColumnsReorder="True" 
                                EnableRowHoverStyle="True" ReorderColumnsOnClient="True">
                                <Selecting AllowRowSelect="True" EnableDragToSelectRows="true" />
                    </ClientSettings>
                </telerik:RadGrid>
            </asp:Panel>
           </td>
          </tr>
          <tr>
              <td>
                 <asp:Panel runat="server" ID="pnlAgreeAdd">
                  <table width = "650" align ="center" >
                        <asp:Label runat="server" ID="lblAgreementSeq" Visible="False"></asp:Label>
                        <asp:Label runat="server" ID="lblEmpSeq" Visible="False"></asp:Label>
                        <tr>
                            <td>Gobal\Objecttive :</td>
                            <td>
                               <asp:TextBox ID="txtGoal" runat="server" TextMode="MultiLine" Width="450px" Height="90px"></asp:TextBox>
                             </td>
                        </tr>
                        <tr>
                            <td>Action Plan:</td>
                            <td>
                                <asp:TextBox ID="txtAction" runat="server" TextMode="MultiLine" Width="450px" Height="90px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>หมายเหตุ :</td>
                            <td>
                                <asp:TextBox ID="txtRemark" runat="server" TextMode="MultiLine" Width="450px" Height="90px"></asp:TextBox>
                            </td>
                        </tr>
                       
                    </table>
                   </asp:Panel>
              </td>
          </tr>
         </table>
       </div>
      </div>
    </form>
</body>
</html>
